package com.ruoyi.web.tdm.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.tdm.mapper.TdmSanYiLiaoQiXieMapper;
import com.ruoyi.web.tdm.domain.TdmSanYiLiaoQiXie;
import com.ruoyi.web.tdm.service.ITdmSanYiLiaoQiXieService;

/**
 * ID-07 三类医疗器械Service业务层处理
 * 
 * @author ly
 * @date 2022-03-14
 */
@Service
public class TdmSanYiLiaoQiXieServiceImpl implements ITdmSanYiLiaoQiXieService 
{
    @Autowired
    private TdmSanYiLiaoQiXieMapper tdmSanYiLiaoQiXieMapper;

    /**
     * 查询ID-07 三类医疗器械
     * 
     * @param id ID-07 三类医疗器械主键
     * @return ID-07 三类医疗器械
     */
    @Override
    public TdmSanYiLiaoQiXie selectTdmSanYiLiaoQiXieById(Long id)
    {
        return tdmSanYiLiaoQiXieMapper.selectTdmSanYiLiaoQiXieById(id);
    }

    /**
     * 查询ID-07 三类医疗器械列表
     * 
     * @param tdmSanYiLiaoQiXie ID-07 三类医疗器械
     * @return ID-07 三类医疗器械
     */
    @Override
    public List<TdmSanYiLiaoQiXie> selectTdmSanYiLiaoQiXieList(TdmSanYiLiaoQiXie tdmSanYiLiaoQiXie)
    {
        return tdmSanYiLiaoQiXieMapper.selectTdmSanYiLiaoQiXieList(tdmSanYiLiaoQiXie);
    }

    /**
     * 新增ID-07 三类医疗器械
     * 
     * @param tdmSanYiLiaoQiXie ID-07 三类医疗器械
     * @return 结果
     */
    @Override
    public int insertTdmSanYiLiaoQiXie(TdmSanYiLiaoQiXie tdmSanYiLiaoQiXie)
    {
        tdmSanYiLiaoQiXie.setCreateTime(DateUtils.getNowDate());
        return tdmSanYiLiaoQiXieMapper.insertTdmSanYiLiaoQiXie(tdmSanYiLiaoQiXie);
    }

    /**
     * 修改ID-07 三类医疗器械
     * 
     * @param tdmSanYiLiaoQiXie ID-07 三类医疗器械
     * @return 结果
     */
    @Override
    public int updateTdmSanYiLiaoQiXie(TdmSanYiLiaoQiXie tdmSanYiLiaoQiXie)
    {
        tdmSanYiLiaoQiXie.setUpdateTime(DateUtils.getNowDate());
        return tdmSanYiLiaoQiXieMapper.updateTdmSanYiLiaoQiXie(tdmSanYiLiaoQiXie);
    }

    /**
     * 批量删除ID-07 三类医疗器械
     * 
     * @param ids 需要删除的ID-07 三类医疗器械主键
     * @return 结果
     */
    @Override
    public int deleteTdmSanYiLiaoQiXieByIds(Long[] ids)
    {
        return tdmSanYiLiaoQiXieMapper.deleteTdmSanYiLiaoQiXieByIds(ids);
    }

    /**
     * 删除ID-07 三类医疗器械信息
     * 
     * @param id ID-07 三类医疗器械主键
     * @return 结果
     */
    @Override
    public int deleteTdmSanYiLiaoQiXieById(Long id)
    {
        return tdmSanYiLiaoQiXieMapper.deleteTdmSanYiLiaoQiXieById(id);
    }
}
